home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-06 / an102x.zip / FIND.ASM < prev    next >
Assembly Source File  |  1991-04-09  |  1KB  |  65 lines

  1. ;*****************************************************************************
  2. ; FIND.ASM
  3. ;
  4. ; 90-12-27 Matt Hagen, Novell, Inc.
  5. ;*****************************************************************************
  6.  
  7. DTAStructure    struc
  8.  Reserved    db    21 dup (?)
  9.  Attribute    db    ?
  10.  Time        dw    ?
  11.  Date        dw    ?
  12.  LowSize    dw    ?
  13.  HighSize    dw    ?
  14.  Name        db    13 dup (?)
  15. DTAStructure    ends
  16.  
  17. DOSSEG
  18. .MODEL    SMALL
  19. .STACK    100h
  20. .DATA
  21.  
  22. DTA    DTAStructure <>
  23. File    db    '*.*', 0
  24.  
  25. .CODE
  26.  
  27. ;*****************************************************************************
  28. ; FindFirstFile
  29. ;*****************************************************************************
  30.  
  31. FindFirstFile    proc    far
  32.     push    ds
  33.     xor    ax, ax
  34.     push    ax
  35.     mov    ax, @data
  36.     mov    ds, ax
  37.  
  38.     mov    ah, 1ah
  39.     lea    dx, DTA
  40.     int    21h
  41.  
  42.     mov    ah, 4eh
  43.     xor    cx, cx
  44.     lea    dx, File
  45.     int    21h
  46.  
  47.     mov    ah, 02h
  48.     lea    bx, DTA.Name
  49.  
  50. DisplayName:
  51.     mov    dl, [bx]
  52.     or    dl, dl
  53.     jz    Exit
  54.     int    21h
  55.     inc    bx
  56.     jmp    DisplayName
  57.  
  58. Exit:
  59.     ret
  60. FindFirstFile    endp
  61.     end
  62.  
  63. ;*****************************************************************************
  64. ;*****************************************************************************
  65.